// $Id: ExportPreferencePage.java 18 2011-09-14 19:16:08Z huijzer@gmail.com $
package lime.application.preference;

import lime.Activator;

import org.eclipse.jface.preference.DirectoryFieldEditor;
import org.eclipse.jface.preference.FieldEditorPreferencePage;
import org.eclipse.jface.preference.StringFieldEditor;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPreferencePage;

public class ExportPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {

	public ExportPreferencePage() {
		super(GRID);
	}

	@Override
	protected void createFieldEditors() {

		addField(new SpacerFieldEditor(getFieldEditorParent()));

		DirectoryFieldEditor exportDirectory = new DirectoryFieldEditor("EXPORT_DIRECTORY", "Export directory:",
				getFieldEditorParent());
		addField(exportDirectory);

		addField(new SpacerFieldEditor(getFieldEditorParent()));

		StringFieldEditor exportXmlFile = new StringFieldEditor("EXPORT_XML_FILE", "Export XML file:",
				getFieldEditorParent());
		addField(exportXmlFile);

		StringFieldEditor exportPdfFile = new StringFieldEditor("EXPORT_PDF_FILE", "Export PDF file:",
				getFieldEditorParent());
		addField(exportPdfFile);

		StringFieldEditor exportExcelFile = new StringFieldEditor("EXPORT_EXCEL_FILE", "Export Excel file:",
				getFieldEditorParent());
		addField(exportExcelFile);

	}

	@Override
	public void init(IWorkbench workbench) {
		setPreferenceStore(Activator.getDefault().getPreferenceStore());
		setDescription("Settings used when exporting DQL results.");
	}

}
